import Vue from "vue";
import App from "./App.vue";
import router from "./router";

// reset.css
import "./assets/style/reset.css";

// element-ui
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(ElementUI);

import "@/assets/icons"; // 自定义svg全局组件

// rem
import './utils/rem'

// drag
import './utils/drag'

// 路由发生变化修改页面title
router.beforeEach((to, from, next) => {
  if (to.meta.title) {
    document.title = to.meta.title;
  }
  next()
})

//vxe-table表格
import 'xe-utils'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
Vue.use(VXETable)

// v-charts图表
import VeLine from 'v-charts/lib/line.common'
Vue.component(VeLine.name, VeLine)

Vue.config.productionTip = false;

new Vue({
  router,
  render: h => h(App)
}).$mount("#app");
